package gui.cen.disp;

import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.*;

/*Author: John Archer, Contact: john.archer.jpa@gmail.com*/
public class Prototype extends JPanel{
    public Prototype(){super(new FlowLayout());this.repaint();}
    private int no = 1;
    public void renderFrontEnd(int n){no = n;this.repaint();}
    public void paintComponent(Graphics g) {
        super.paintComponent(g);
        showPrototype(g);
    }
    private BufferedImage image;
    //use card layout and panels here to do movie!!
    private void showPrototype(Graphics g){
      try {
          //image = ImageIO.read(new File("."+File.separator+"/images/vtb_"+no+".png"));
          image = ImageIO.read(getClass().getResource("/images/vtb_"+no+".png"));
       } catch (IOException ex) {}
       g.drawImage(image, 0, 0, null);
    }

}